using Godot;
using Godot.Collections;
using System;


public class SteamGeneratorBlockEntity : BlockEntity
{
    public FluidData steam = new FluidData("steam", 0, 16000);
    public SteamGeneratorBlockEntity()
    {
        tick = 10;
    }
    public override Dictionary getDict()
    {
        Dictionary dict = new Dictionary
        {
            { "steam", steam.GetDictionary() },
            { "tick", tick }
        };
        return dict;
    }
    public override BlockEntity JsonTo(Dictionary dict)
    {
        steam.Parse((Dictionary)dict["steam"]);
        tick = dict["tick"].ToInt();
        return this;
    }
    public override FluidData GetFluid(int index)
    {
        if (index == 0) return steam;
        else return null;
    }
    public override FluidData GetFluid(string name)
    {
        if (name == "steam") return steam;
        else return null;
    }
}

